﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IfSoft.OA.Entities
{
    public class SearchCriteriaBase
    {
        //public const int DefaultPageSize = 20;

        private int _pageSize = 20;
        public int PageSize
        {
            get { return _pageSize; }
            set { _pageSize = value; }
        }

        public int StartIndex { get; set; }

        public int PageNumber
        {
            set
            {
                StartIndex = (value - 1) * PageSize;
            }
        }

        public DateTime? DateFrom { get; set; }

        public DateTime? DateTo { get; set; }

        public string SortBy { get; set; }

        public bool SortByDesc { get; set; }

    }
}
